package org.spring.springboot.app.file.service;

import cn.novelweb.tool.upload.local.pojo.UploadFileParam;
import org.spring.springboot.app.base.R;
import org.spring.springboot.app.file.domain.vo.FileSearchVO;
import org.spring.springboot.app.file.domain.vo.FileVO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface IFileService {


    R upload(MultipartFile file,String appId) ;

    R delete(String fileId, String appId);

    R getOne(String fileId, String appId);

    R deletePath(String filePath, String appId);

    List<FileVO> getList(FileSearchVO searchVO);

    R upload_obs(MultipartFile file, String appId);

    R upload_shard(UploadFileParam uploadFileParam, String appId,  HttpServletRequest request);

    R checkFileMd5(String appId,String md5,String fileName,Integer type) throws Exception;

    R successFile(String appId, String md5,Integer type,String fileName,Long fileSize) throws Exception;

    R upload_shard_obs(UploadFileParam uploadFileParam, String appId, HttpServletRequest request);

    R download_obs(String appId,String url, HttpServletRequest request, HttpServletResponse response);

    R delete_file(String appId, String url);

    R download(String appId, String url, HttpServletRequest request, HttpServletResponse response);

    R video_download(String videoId,String userId, Integer type, HttpServletRequest request, HttpServletResponse response);

    R drama_video_download(String dramaId,String userId, Integer type, HttpServletRequest request, HttpServletResponse response);

//    R upload_shard(String name, String shard, String size, String shardTotal, String shardSize, String appId);

//    R<FileVO> upload_obs_s(MultipartFile file, String appId);
}
